import numpy as np
a = np.array([True, False, True], dtype=bool)
b = np.array([False, False, True], dtype=bool)
print(np.bitwise_and(a, b))
print(np.bitwise_or(a, b))
print(np.bitwise_xor(a, b))
# np.invert() == np.bitwise_not()
print(np.invert(a))
# 左移：5 * (2 ** 2)
print(np.left_shift(5, 2))
# 右移：10 / (2 ** 1)
print(np.right_shift(10, 1))